package com.hzncc.flowable_diboot.contract.vo;

import com.diboot.core.binding.annotation.BindDict;
import com.diboot.core.binding.annotation.BindEntityList;
import com.diboot.core.binding.annotation.BindField;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.file.entity.FileRecord;
import com.diboot.iam.entity.IamUser;
import com.hzncc.flowable_diboot.contract.entity.SalesContractExt;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 销售合同扩展信息 VO定义
* @author MyName
* @version 1.0
* @date 2024-09-18
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class SalesContractExtListVO extends SalesContractExt  {
private static final long serialVersionUID = 1163206249512566887L;
    /**
    * 合同类型 关联字典选项
    */
    @BindDict(
    type = "salesContractType",
    field = "contractType"
    )
    private LabelValue contractTypeLabel;

    /**
    * 合同附件类型 关联字典选项
    */
    @BindDict(
    type = "salesContractAttachType",
    field = "contractAttachmentType"
    )
    private LabelValue contractAttachmentTypeLabel;

    /**
    * 合同附件 关联文件信息
    */
    @BindEntityList(entity = FileRecord.class, condition = "this.contract_attachment = id", splitBy = ",")
    private List<FileVO> contractAttachmentFiles;

    /**
    * 机床类型 关联字典选项
    */
    @BindDict(
    type = "salesContactMachineToolType",
    field = "machineToolType"
    )
    private LabelValue machineToolTypeLabel;

    /**
    * 内部核算标准 关联字典选项
    */
    @BindDict(
    type = "internalAccountingStandards",
    field = "internalAccountingStandard"
    )
    private LabelValue internalAccountingStandardLabel;

    /**
    * 合同折扣权限 关联字典选项
    */
    @BindDict(
    type = "discountAuthority",
    field = "contractDiscountAuthority"
    )
    private LabelValue contractDiscountAuthorityLabel;

    /**
    * 结算方式及期限 关联字典选项
    */
    @BindDict(
    type = "salesContractDeadlines",
    field = "settlementMethodAndDeadline"
    )
    private LabelValue settlementMethodAndDeadlineLabel;

    /**
    * 合同文本 关联字典选项
    */
    @BindDict(
    type = "contractText",
    field = "contractText"
    )
    private LabelValue contractTextLabel;

    /**
    * 收货回执状态 关联字典选项
    */
    @BindDict(
    type = "receiptStatusOfGoods",
    field = "receiptStatusOfGoods"
    )
    private LabelValue receiptStatusOfGoodsLabel;

    /**
    * 公司合同类型 关联字典选项
    */
    @BindDict(
    type = "companyContractsType",
    field = "companyContractType"
    )
    private LabelValue companyContractTypeLabel;

    /**
    * 产品类型 关联字典选项
    */
    @BindDict(
    type = "salesContractProductType",
    field = "productType"
    )
    private LabelValue productTypeLabel;

    /**
    * 档次 关联字典选项
    */
    @BindDict(
    type = "salesContractGrade",
    field = "grade"
    )
    private LabelValue gradeLabel;

    /**
    * 销售部门 关联字典选项
    */
    @BindDict(
    type = "salesDept",
    field = "salesDepartment"
    )
    private LabelValue salesDepartmentLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

    /**
     * 销售地区 关联字典选项
     */
    @BindDict(
            type = "salesPlace",
            field = "salesRegion"
    )
    private LabelValue salesRegionLabel;
}